package com.qdxwx.models.coupon;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 优惠卷编码类
 *
 */
public class CouponCode implements Serializable{

    private static final long serialVersionUID = 4420994612159787258L;

    protected Long id;
	/**
	 * 优惠卷id
	 */
    protected Long couponId;
    /**
     * 优惠卷编码
     */
    protected String couponCode;
    /**
     * 订单id
     */
    protected Integer orderId;
    /**
     * 订单request_id
     */
    protected String orderNo;
    /**
     * 支付成功时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime payTime;
    /**
     * 使用时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime useTime;
    /**
     * 使用者id
     */
    protected Long userId;
    /**
     * 优惠券所属者昵称
     */
    protected String userName;
    /**
     * 优惠卷状态 1未使用 2为已使用 3过期 4作废
     */
    protected Integer status;
    /**
     * 优惠券过期提示状态 0 未提示 1 已提示
     */
    protected Integer isRemind;
    /**
     * 生成时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public String getCouponCode() {
        return couponCode;
    }

    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public LocalDateTime getUseTime() {
        return useTime;
    }

    public void setUseTime(LocalDateTime useTime) {
        this.useTime = useTime;
    }

    public LocalDateTime getPayTime() {
        return payTime;
    }

    public void setPayTime(LocalDateTime payTime) {
        this.payTime = payTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsRemind() {
        return isRemind;
    }

    public void setIsRemind(Integer isRemind) {
        this.isRemind = isRemind;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CouponCode{" +
                "id=" + id +
                ", couponId=" + couponId +
                ", couponCode='" + couponCode + '\'' +
                ", orderNo='" + orderNo + '\'' +
                ", orderId=" + orderId +
                ", useTime=" + useTime +
                ", payTime=" + payTime +
                ", status=" + status +
                ", isRemind='" + isRemind + '\'' +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
